home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / docs / mags / AIOV27.lha / aioissue27 / data / fe6 < prev    next >
Encoding:
Text File  |  1999-08-19  |  3.9 KB  |  76 lines

  1.  
  2. {center}
  3. {subhead} Emulation Idea{def}{p}
  4. Article by Mark A. Tierno
  5. {left}
  6. {p} {p}
  7.  
  8. I know there's plenty of emulators out there, emulators for every
  9. platform from the Trash-80 on up. But, they all have one feature in
  10. common which I feel is unnessecary.
  11. {p} {p}
  12. They don't just run the program from whichever other OS, but first
  13. bring up a system screen for what's being emulated, and basically run
  14. the entire foregin OS. That's the memory for that screen, the extra CPU
  15. cycles used just to bring up the other OS, and however much of your hard
  16. drive is used just to store the other OS in it's own partition. This is
  17. a lot of overhead, especially when you're talking Windows. And here all
  18. we ever want to do is run one stinking program (usually a game).
  19. {p} {p}
  20. But, there is a better way, and perhaps only the unique configuration of
  21. the Amiga makes it possible.
  22. {p} {p}
  23. Skip running the entitre OS, system screen, and whatever else. Just
  24. run the bloody program. How, you ask? The answer is actually very
  25. simple.
  26. {p} {p}
  27. The emulation would have three parts. The first part would be a
  28. commodity that, when a given program gfile is clicked on and not
  29. recognized as an Amiga program, scans it to see if it's code type
  30. matches any of the ones in it's list- usually MAC, IBM DOS, or Windows.
  31. but it could be extended to others with plug-in modules stored in a
  32. directory devoted to just this purpose. When the commodity makes a
  33. match, it passes the foreign program onto the next component.
  34. {p} {p}
  35. The second component would be a series of small micro-emulation
  36. programs, each one devoted to a different OS. A MAC program would be
  37. passed to the MAC emulator, a Windows program to the windows emulator,
  38. IBM DOS to it's own, and so on. The function of each such program would
  39. be the same; as each line of code is in turn read from the foreign
  40. program file, it matches it up to the equivalent Amiga assembly or
  41. system call, translating any procedure or subroutine calls, and then
  42. passing these on to the third component, the emulation library. The
  43. program would be run through this component, calling up a default window
  44. if no window or screen is program-specified, and take care of "running"
  45. the program.
  46. {p} {p}
  47. The emulation library is another one which would be a differenbt version
  48. specific to the OS being emulated. As a library it would be very
  49. simple; all calls passed to it are redirected to the appropriate Amiga
  50. library, OS command, or system call. We're talking one-line routine
  51. calls here. Any routines passed to it would first have to be reduced to
  52. the simplest assembly-level calls for that given OS by the second
  53. component, so all this library would then have to do is translate one
  54. assembly-level call into an Amiga one. This component of the emulation
  55. would be the easiest to program, since all you'd need is a complete list
  56. of the machine language commands from the other system and then have a
  57. single redirect call for each one.
  58. {p} {p}
  59. At this point, you're running the other program as an Amiga-native task.
  60. No need for other screens, no need for a good chunk of your hard drive
  61. devoted to an OS you don't need, just click and run the program like any
  62. other- straight off your Workbench. Speed? Well, it's just a series of
  63. redirects to other libraries; make the libraries resident and you
  64. shouldn't have much of a performance hit. At the very least it'll be a
  65. lot faster than standard emulations, and a lot more adaptable.
  66. {p} {p}
  67. Good idea, but why am I not programming this thing myself? Well, I don't
  68. have the requisite programming and foreign OS knowledge to pull this
  69. off. Hence the purpose of this article. If there's any programmers out
  70. there that think they're up to this job, then I challenge you to try.
  71. You'll be giving the Amiga community an invaluable resource, and be
  72. recognized for performing a revolutionary programming feat.
  73. {p} {p}
  74. All you have to do is give me credit for the idea. ;-)
  75. {p} {p}
  76. Comments, ideas? email : {bold}letters@aio.co.uk{nobold}